package com.ztc.beans;

import java.util.Objects;

public class Glo {
    private int id;
    private String name;
    private  int parentId;
    private int levelType;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getLevelType() {
        return levelType;
    }

    public void setLevelType(int levelType) {
        this.levelType = levelType;
    }

    public int getParentId() {
        return parentId;
    }

    public void setParentId(int parentId) {
        this.parentId = parentId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    public Glo(int id, String name, int parentId, int levelType) {
        this(name,parentId,levelType);
        this.id = id;
    }
    public Glo(String name, int parentId, int levelType) {
        this.name = name;
        this.parentId = parentId;
        this.levelType = levelType;
    }
    public Glo() {
    }

    @Override
    public String toString() {
        return "Glo{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", parentid=" + parentId +
                ", levelType=" + levelType +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (o == null || getClass() != o.getClass()) return false;
        Glo glo = (Glo) o;
        return id == glo.id && parentId == glo.parentId && levelType == glo.levelType && Objects.equals(name, glo.name);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name, parentId, levelType);
    }
}
